home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / powerapp / animator.exe / ANIMATOR.DXR / 00060_MORE SCRIPTS.ls < prev    next >
Encoding:
Text File  |  1996-05-07  |  1.1 KB  |  48 lines

  1. on addLists masterList, listToAdd
  2.   if not listp(masterList) then
  3.     if masterList <> EMPTY then
  4.       exit
  5.     end if
  6.     set theDataType to getIlk(listToAdd)
  7.     if theDataType = #linearList then
  8.       set masterList to []
  9.     else
  10.       if theDataType = #propertyList then
  11.         set masterList to [:]
  12.       else
  13.         exit
  14.       end if
  15.     end if
  16.   end if
  17.   if not listp(listToAdd) and (listToAdd <> EMPTY) then
  18.     exit
  19.   end if
  20.   if getIlk(masterList) <> getIlk(listToAdd) then
  21.     exit
  22.   end if
  23.   if getIlk(masterList) = #linearList then
  24.     set newItemCount to count(listToAdd)
  25.     repeat with x = 1 to newItemCount
  26.       add(masterList, getAt(listToAdd, x))
  27.     end repeat
  28.   else
  29.     set newItemCount to count(listToAdd)
  30.     repeat with x = 1 to newItemCount
  31.       addProp(masterList, getPropAt(listToAdd, x), getAt(listToAdd, x))
  32.     end repeat
  33.   end if
  34. end
  35.  
  36. on getIlk data
  37.   if listp(data) then
  38.     if ilk(data, #propList) then
  39.       set theIlk to #propList
  40.     else
  41.       set theIlk to #linearList
  42.     end if
  43.   else
  44.     set theIlk to ilk(data)
  45.   end if
  46.   return theIlk
  47. end
  48.